Skip to content

Feat/pydantic shipping label agent - #174

Merged
gautammanak1 merged 4 commits into
fetchai:mainfrom
thienphuquach:feat/pydantic-shipping-label-agent
Jul 24, 2026
Merged

Feat/pydantic shipping label agent#174
gautammanak1 merged 4 commits into
fetchai:mainfrom
thienphuquach:feat/pydantic-shipping-label-agent

Conversation

@thienphuquach

@thienphuquach thienphuquach commented Jul 24, 2026

Copy link
Copy Markdown

Summary

It's a chat agent that shops shipping rates across USPS, UPS, FedEx, and DHL, then buys the label once you approve the price, entirely through ASI:One Interactive Cards. Instead of opening each carrier's site separately and re-entering the same package details three times, you state the destination and package once, get a live rate comparison with a recommendation, and confirm.

Youtube Demo : https://youtu.be/ZR83LAA2lJI

A few things worth calling out:

  • Two separate charges, not one. A flat intake fee unlocks the conversation on the first message, then a second, exact-price charge for the chosen label has to succeed before Shippo is ever called to buy it. A declined second charge sends the user back to pick a different rate instead of purchasing anyway.
  • Hazmat and insurance are handled the way real carriers handle them, not as a flat refusal. A "yes, this needs special handling" answer filters the rate carousel down to ground-only services with the carrier's actual prohibited-items page linked, rather than blocking the shipment outright.
  • Everything is test-mode only, enforced at startup. Stripe test keys and a Shippo test token are asserted on boot; there's no code path that can select a live key.

Type of Change

  • New agent example

Checklist

  • I have starred this repository.
  • I ran ruff check ..
  • I ran ruff format ..
  • I added/updated README.md for the example (plus an ARCHITECTURE.md with a sequence diagram).
  • I added .env.example.
  • I updated root CHANGELOG.md.
  • I added my agent to the Community Contributors table in root README.md. (Not a community contribution, this is a core pydantic-agent/ framework example.)
  • I verified paths/commands used in docs.
  • I understand this PR requires maintainer review before merge.

Notes for Reviewers

  • Known limitations (international shipping, multiple packages per session, editing/cancelling a booked pickup) are documented in the example's own README under "Known Limitations", intentionally out of scope for this PR.
  • All 88 tests run against TestModel/FunctionModel and mocked Stripe/Shippo clients, no real network calls or credentials needed to verify locally.

quachphu and others added 4 commits July 24, 2026 09:28
…mple

Test-mode-only shipping-label booking agent for ASI:One. Demonstrates
Pydantic AI's requires_approval=True human-in-the-loop gating, deps_type
dependency injection, and structured output inside the real ASI:One
interactive-card flow. Two-tier Stripe test payments, Shippo test-mode
rate shopping, hazmat self-certification, optional insurance, and
SAMPLE-label purchase with PDF delivery via Agentverse External Storage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the CHANGELOG.md/README.md edits so the diff touches nothing
outside the new example's own folder.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@gautammanak1
gautammanak1 merged commit 5ada3da into fetchai:main Jul 24, 2026
13 checks passed
@thienphuquach
thienphuquach deleted the feat/pydantic-shipping-label-agent branch July 24, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants